﻿@model IdentitySample.Models.IndexViewModel
@{
    ViewBag.Title = "Manage your account";
}

<div class="row">
    <!-- Page Header -->
    <div class="col-lg-12">
        <h1 class="page-header">@ViewBag.Title</h1>
    </div>
    <!--End Page Header -->
</div>

<p class="text-success">@ViewBag.StatusMessage</p>
<div class="row">
    <div class="col-md-8">
        <p>
            @if (Model.HasPassword)
            {
                @Html.ActionLink("Change your password", "ChangePassword")
            }
            else
            {
                @Html.ActionLink("Pick a password", "SetPassword")
            }
        </p>
        <p>
            Phone Number: @(Model.PhoneNumber ?? "None") [
            @if (Model.PhoneNumber != null)
            {
                @Html.ActionLink("Change", "AddPhoneNumber")
                @: &nbsp;|&nbsp;
                @Html.ActionLink("Remove", "RemovePhoneNumber")
            }
            else
            {
                @Html.ActionLink("Add", "AddPhoneNumber")
            }
            ]
        </p>
        <p>
            External Logins: @Model.Logins.Count
            @Html.ActionLink("[Manage]", "ManageLogins")
        </p>
        @if (Model.TwoFactor)
        {
            <form method="post" action="/Manage/DisableTFA">
                <p>
                    Two factor is currently enabled:
                    <input type="submit" value="Disable" class="btn btn-default"/>
                </p>
            </form>
        }
        else
        {
            <form method="post" action="/Manage/EnableTFA">
                <p>
                    Two factor is currently disabled:
                    <input type="submit" value="Enable" class="btn btn-default"/>
                </p>
            </form>
        }
        @if (Model.BrowserRemembered)
        {
            <form method="post" action="/Manage/ForgetBrowser">
                <p>
                    Browser is curently remembered for two factor:
                    <input type="submit" value="Forget Browser" class="btn btn-default" />
                </p>
            </form>
        }
        else
        {
            <form method="post" action="/Manage/RememberBrowser">
                <p>
                    Browser is curently not remembered for two factor:
                    <input type="submit" value="Remember Browser" class="btn btn-default"/>
                </p>
            </form>
        }
    </div>
</div>
